<template>

  <a-col :span="24">
    <a-form-model-item label="性别" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sex">
      <j-dict-select-tag type="list" v-model="model.sex" dictCode="sex" placeholder="请选择性别" />
    </a-form-model-item>
    <a-form-model-item label="性别" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sex">
      <j-multi-select-tag type="list" v-model="model.sex" dictCode="sex" placeholder="请选择性别" />
    </a-form-model-item>
  </a-col>



</template>

<script>
import {getAction} from '@api/manage'

export default {
  name: 'JVxeTeam',
  data() {
    return {
      model:{
      }
    }
    sex: [{0:"男"} ,{1:"女"}]
  },
  methods: {
    /**
     * 模拟从后台查询数据
     */
    requestData(parent) {
      console.log(parent)
      return new Promise((resolve, reject) => {
        let data = this.mockData.filter(i => i.parent === parent)
        setTimeout(() => {
          resolve(data)
        }, 500)
      })
    },

    async loadMenu(parent) {
      let res
      // 如果parent为空，则查询第一级菜单
      if (parent === '') {
        res = await getAction('/sys/permission/getSystemMenuList')
      } else {
        res = await getAction('/sys/permission/getSystemSubmenu', {parentId: parent})
      }
      if (res.success) {
        // 返回的数据里必须包含 value 和 text 字段
        return res.result.map(item => ({value: item.id, text: item.name}))
      }
      this.$message.warning('loadMenu失败：' + res.message)
      return []
    },

  }
}
</script>

<style scoped>

</style>